package com.headingdata.d8_generics_class;

public class Test {

    public static void main(String[] args) {
        //目标：掌握泛型类的定义和作用。
        MyArrayList<String> list = new MyArrayList<>();
        list.add("java1");
        list.add("java2");
        list.add("java3");
        list.add("测试类");
//        list.add(new Cat());
        System.out.printf(list.get(2));
        MyClass2<Dog,String> c2 = new MyClass2<>();
        c2.put(new Dog(),"狗狗喜欢吃狗粮");

        MyClass3<Dog> c3 = new MyClass3<>();
        c3.printE(new Dog());
    }
}

class Cat{

}
